package com.trailer.base.binding;

import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import androidx.databinding.BindingAdapter;

public class EditTextBindingAdapter {

    @BindingAdapter("on_focused")
    public static void setFocusedListener(EditText view, View.OnFocusChangeListener listener) {
        if (listener != null) {
            view.setOnFocusChangeListener(listener);
        }
    }

    @BindingAdapter("on_action")
    public static void setOnActionSearch(EditText view, TextView.OnEditorActionListener listener) {
        view.setOnEditorActionListener(listener);
    }

}
